﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateOrEdit.ascx.cs"
    Inherits="CMS.Controls.News.CreateOrEdit" %>
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="/js/tinymce.init.js"></script>
<script type="text/javascript" src="/js/jquery.tokeninput.js"></script>
<asp:Literal ID="ltMessage" runat="server" />
<div class="fix">
</div>
<fieldset>
    <div class="widget" style="margin-top: 20px">
        <div class="head">
            <h5 class="iList">
                <asp:Literal ID="ltTitle" runat="server" /></h5>
            <asp:Button ID="btnSaveAndContinue" Text="Lưu và tiếp tục" ClientIDMode="Static"
                Visible="false" CssClass="seaBtn mt5 mr5 floatright" OnClick="BtnSaveAndContinue"
                runat="server" />
        </div>
        <div class="rowElem nobg">
            <label>
                Danh mục</label>
            <div class="formRight">
                <asp:DropDownList ID="ddlCategory" runat="server" Width="60">
                    <asp:ListItem Text="Gốc" Value="0" />
                </asp:DropDownList>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Tiêu đề</label>
            <div class="formRight">
                <asp:TextBox ID="txtTitle" runat="server" CssClass="validate[required]" />
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Tiêu đề phụ</label>
            <div class="formRight">
                <asp:TextBox ID="txtSubTitle" runat="server" />
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Tóm tắt</label>
            <div class="formRight">
                <asp:TextBox ID="txtSapo" TextMode="MultiLine" Height="80" runat="server" />
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Ảnh avatar</label>
            <div class="formRight">
                <asp:TextBox ID="txtImage" ClientIDMode="Static" Width="500" CssClass="floatleft"
                    runat="server" />
                <a class="floatleft btn14 mr5 ml5 topDir" title="Chọn ảnh" onclick="openFileManager('txtImage');"
                    href="#">
                    <img src="/images/icons/dark/folder.png" alt="" />
                </a><a class="floatleft btn14 topDir" title="Xem ảnh" onmousemove="viewImage('txtImage', 'medium', 150, 95);"
                    onmouseout="closeViewImage();">
                    <img src="/images/icons/dark/image2.png" alt="" />
                </a><span style="line-height: 28px;">&nbsp;( > 150 x 95)</span>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Ảnh trang chủ</label>
            <div class="formRight">
                <asp:TextBox ID="txtImageHomePage" ClientIDMode="Static" Width="500" CssClass="floatleft"
                    runat="server" />
                <a class="floatleft btn14 mr5 ml5 topDir" title="Chọn file ảnh" onclick="openFileManager('txtImageHomePage', 'textbox');"
                    href="#">
                    <img src="/images/icons/dark/folder.png" alt="" />
                </a><a class="floatleft btn14 topDir" title="Xem ảnh" onmousemove="viewImage('txtImageHomePage', 'large', 310, 200);"
                    onmouseout="closeViewImage();">
                    <img src="/images/icons/dark/image2.png" alt="" />
                </a><span style="line-height: 28px;">&nbsp;( > 310 x 200)</span>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Nội dung</label>
            <div class="formRight">
                <textarea id="elm1" name="elm1" class="QuizEditor" rows="50" cols="80"></textarea>
                <div style="display: none">
                    <asp:TextBox ID="txtBody" ClientIDMode="Static" TextMode="MultiLine" runat="server" />
                </div>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Ngày xuất bản</label>
            <div class="formRight">
                <asp:TextBox ID="txtPublishOn" CssClass="datepicker validate[required]" runat="server" />
                <asp:TextBox ID="txtTime" ClientIDMode="Static" CssClass="timepicker ml10" runat="server" />
                <span class="ml10">(Cuộn chuột giữa hoặc bàn phím)</span>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Nổi bật</label>
            <div class="formRight">
                <asp:CheckBox ID="cbIsHomePage" Text="Trang chủ" runat="server" />
                <asp:CheckBox ID="cbIsList" Text="Trang danh sách" runat="server" />
                <asp:CheckBox ID="cbIsBox" Text="Box" runat="server" />
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem">
            <label>
                Bút danh</label>
            <div class="formRight">
                <asp:TextBox ID="txtPenName" runat="server" />
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem nodisplay">
            <label>
                Thêm tag</label><div class="formRight">
                    <asp:TextBox ID="txtAddTag" Width="580px" CssClass="rightDir floatleft txtAddTag"
                        title="Thêm tag" runat="server"></asp:TextBox>
                    <div class="floatleft">
                        <a href="javascript:void(0)" onclick="checkTagValid()" title="" class="btn14 mr5 ml5">
                            <img src="/images/icons/dark/check.png" alt="" />
                        </a>
                    </div>
                </div>
            <div class="fix">
            </div>
        </div>
        <div class="rowElem nodisplay">
            <label>
                Tag</label>
            <div id="tag-contain" class="formRight">
                <input type="text" id="tag-autocomplete" name="blah2" />
                <script type="text/javascript">
                    $(document).ready(function () {
                        addTag(currentTagDetails);
                    });
                </script>
            </div>
            <div class="fix">
            </div>
        </div>
        <div class="body floatright">
            <asp:Button ID="btnSend" Text="Gửi chờ xuất bản" ClientIDMode="Static" Visible="false"
                CssClass="seaBtn mb15 ml5" OnClick="BtnSend" OnClientClick="getMCE();getTag();"
                runat="server" />
            <asp:Button ID="btnPublish" Text="Xuất bản" ClientIDMode="Static" Visible="false"
                CssClass="seaBtn mb15 ml5" OnClick="BtnPublish" OnClientClick="getMCE();getTag();"
                runat="server" />
            <asp:Button ID="btnRestore" Text="Phục hồi" ClientIDMode="Static" Visible="false"
                CssClass="seaBtn mb15 ml5" OnClick="BtnRestore" OnClientClick="getMCE();getTag();"
                runat="server" />
            <asp:Button ID="btnRemove" Text="Gỡ bài viết" ClientIDMode="Static" Visible="false"
                CssClass="redBtn mb15 ml5" OnClick="BtnRemove" OnClientClick="getMCE();getTag();"
                runat="server" />
            <asp:Button ID="btnDelete" Text="Xóa bài viết" ClientIDMode="Static" Visible="false"
                CssClass="redBtn mb15 ml5" OnClick="BtnDelete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa?');"
                runat="server" />
            <asp:Button ID="btnSave" Text="Lưu lại" ClientIDMode="Static" Visible="false" CssClass="seaBtn mb15 ml5 mr15"
                OnClick="BtnSave" OnClientClick="getMCE();getTag();" runat="server" />
            <asp:Button ID="btnSaveWithoutStatus" Text="Lưu lại" ClientIDMode="Static" Visible="false"
                CssClass="seaBtn mb15 ml5" OnClick="BtnSaveWithoutStatus" OnClientClick="getMCE();getTag();"
                runat="server" />
        </div>
        <div class="fix">
        </div>
    </div>
</fieldset>
<asp:HiddenField ID="hfId" Value="0" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="hfTypeId" Value="0" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="hfTag" Value="0" ClientIDMode="Static" runat="server" />
<asp:HiddenField ID="hfUsername" Value="" ClientIDMode="Static" runat="server" />
